package com.mystudio.android.util;

import android.util.Log;

public class Logger {
	private String tag;
	private String srcClassName;
	
	public Logger(String tag, Class<?> srcClass) {
		this.tag = tag;
		this.srcClassName = srcClass.getName();
	}

	public void debug(String message) {
		Log.d(tag, srcClassName + ":" + message);
	}

	public void info(String message) {
		Log.i(tag, srcClassName + ":" + message);
	}

	public void warn(String message) {
		Log.w(tag, srcClassName + ":" + message);
	}

	public void error(String message, Throwable e) {
		Log.e(tag, srcClassName + ":\n" + message + ":" + e.getMessage() + "\n" + Log.getStackTraceString(e), e);
	}
}
